{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Numpy数组创建: 1. 按要求补全代码，创建一个全0一个全1的数组\n",
    "\n",
    "---\n",
    "个人信息:  \n",
    "- 姓名: 石庆波\n",
    "- 年级: 2020\n",
    "- 专业: 智能科学与技术\n",
    "- 班级: 一班\n",
    "---\n",
    "\n",
    "- 诚信守则:  \n",
    "    - 我承诺该报告内容**为我个人书写非直接抄袭所得。**\n",
    "    - 我**可以解释答题思路并复现我的答案。**\n",
    "    - 如无法实现以上要求，**我愿意承担由此带来的后果。**\n",
    "---"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "x0 shape: (2, 5)\n",
      "x0 content: [[0 0 0 0 0]\n",
      " [0 0 0 0 0]]\n",
      "x1 shape: (5, 2)\n",
      "x1 content: [[1 1]\n",
      " [1 1]\n",
      " [1 1]\n",
      " [1 1]\n",
      " [1 1]]\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "x0=np.zeros((2,5),dtype=int)\n",
    "x1=np.ones((5,2),dtype=int)\n",
    "info = f'''\n",
    "x0 shape: {x0.shape}\n",
    "x0 content: {x0}\n",
    "x1 shape: {x1.shape}\n",
    "x1 content: {x1}\n",
    "'''\n",
    "print(info)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "x=np.eye(100)\n",
    "plt.imshow(x,cmap='gray')\n",
    "plt.savefig('out.png', bbox_inches='tight')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
